import React from 'react';
import _ from 'lodash';
import './index.less';

const TjUploadErrorContent: React.FC<ITjUploadErrorContentProps> = (props) => {
  return (
    <div className="tj-upload-error-content">
      {props.errorMsg && _.isArray(props.errorMsg)
        ? (props.errorMsg as string[]).join(',')
        : props.errorMsg}
    </div>
  );
};

interface ITjUploadErrorContentProps {
  errorMsg?: string | string[];
}

export default TjUploadErrorContent;
